\<%@ page pageEncoding="UTF-8"%>
\<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
\<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
\<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
\<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
\<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<%  //权限判断  %>
<shield:permssion type="button">
<div >
	<!-- t改为shieldTarget，且为jQuery选择器形式 -->
    <form action="\${ctxPathA}/${baseURL!}/search" method="post" shieldTarget="#searchResult" class="searchForm">
    	<shield:token/>
        <div class="search-box">
			<% //循环输出属性 %>
		    <% for ( fieldModel in fieldList ) { %>
		        <% if ( fieldModel.canSearch ) { %>
		        	<% if ( fieldModel.searchType == "date_" ) { %>
		    <span class="search-i"><b>${fieldModel.comments}：</b>
		    	<input type="text" name="<shield:encrypt value="${fieldModel.searchType}s${fieldModel.fieldName}"/>" class="Wdate" value=""
                   id="startDate" shieldSettings="{maxDate:'#F{$dp.$D(\'endDate\')}'}"/>-
            	<input type="text" name="<shield:encrypt value="${fieldModel.searchType}e${fieldModel.fieldName}"/>" value="" class="Wdate" id="endDate" shieldSettings="{minDate:'#F{$dp.$D(\'startDate\')}'}"/>
            </span>
		        	<% } else { %>
		    <span class="search-i"><b>${fieldModel.comments}：</b><input type="text" name="<shield:encrypt value="${fieldModel.searchType}${fieldModel.fieldName}"/>"/></span>
		        	<% } %>
		        <% } %>
		    <% } %>
            <span class="search-i">
	            <input class="submit" type="submit" name="doSearch" value="查询">
	            <!-- href改为data-url -->
	            <a data-url="\${ctxPathA }/${baseURL!}/toAddOrUpdate" class="shieldDialog" viewTitle="添加${modelComments!}信息" viewWidth="1000">
	            	<input class="addBaseTable" type="button" name="addBaseTable" value="添加">
	            </a>
            </span>
        </div>
        <div id="searchResult"></div>
    </form>
</div>
</shield:permssion>